﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DeployGames.TweenEngine.equations;

namespace DeployGames.TweenEngine
{
    public class TweenEquations
    {
        public static Linear easeNone = Linear.INOUT;

        #region Quad
        public static Quad easeInQuad = Quad.IN;
        public static Quad easeOutQuad = Quad.OUT;
        public static Quad easeInOutQuad = Quad.INOUT;
        #endregion
        #region Cubic
        public static Cubic easeInCubic = Cubic.IN;
        public static Cubic easeOutCubic = Cubic.OUT;
        public static Cubic easeInOutCubic = Cubic.INOUT;
        #endregion
        #region Quart
        public static Quart easeInQuart = Quart.IN;
        public static Quart easeOutQuart = Quart.OUT;
        public static Quart easeInOutQuart = Quart.INOUT;
        #endregion
        #region Quint
        public static Quint easeInQuint = Quint.IN;
        public static Quint easeOutQuint = Quint.OUT;
        public static Quint easeInOutQuint = Quint.INOUT;
        #endregion
        #region Circ
        public static Circ easeInCirc = Circ.IN;
        public static Circ easeOutCirc = Circ.OUT;
        public static Circ easeInOutCirc = Circ.INOUT;
        #endregion
        #region Sine
        public static Sine easeInSine = Sine.IN;
        public static Sine easeOutSine = Sine.OUT;
        public static Sine easeInOutSine = Sine.INOUT;
        #endregion
        #region Expo
        public static Expo easeInExpo = Expo.IN;
        public static Expo easeOutExpo = Expo.OUT;
        public static Expo easeInOutExpo = Expo.INOUT;
        #endregion
        #region Back
        public static Back easeInBack = Back.IN;
        public static Back easeOutBack = Back.OUT;
        public static Back easeInOutBack = Back.INOUT;
        #endregion
        #region Bounce
        public static Bounce easeInBounce = Bounce.IN;
        public static Bounce easeOutBounce = Bounce.OUT;
        public static Bounce easeInOutBounce = Bounce.INOUT;
        #endregion
        #region Elastic
        public static Elastic easeInElastic = Elastic.IN;
        public static Elastic easeOutElastic = Elastic.OUT;
        public static Elastic easeInOutElastic = Elastic.INOUT;
        #endregion

        public static TweenEquation getEase(string easeName)
        {
            switch (easeName)
            {
                #region Quad
                case "Quad.IN":
                    return easeInQuad;
                case "Quad.OUT":
                    return easeOutQuad;
                case "Quad.INOUT":
                    return easeInOutQuad;
                #endregion
                #region Cubic
                case "Cubic.IN":
                    return easeInCubic;
                case "Cubic.OUT":
                    return easeOutCubic;
                case "Cubic.INOUT":
                    return easeInOutCubic;
                #endregion
                #region Quart
                case "Quart.IN":
                    return easeInQuart;
                case "Quart.OUT":
                    return easeOutQuart;
                case "Quart.INOUT":
                    return easeInOutQuart;
                #endregion
                #region Quint
                case "Quint.IN":
                    return easeInQuint;
                case "Quint.OUT":
                    return easeOutQuint;
                case "Quint.INOUT":
                    return easeInOutQuint;
                #endregion
                #region Circ
                case "Circ.IN":
                    return easeInCirc;
                case "Circ.OUT":
                    return easeOutCirc;
                case "Circ.INOUT":
                    return easeInOutCirc;
                #endregion
                #region Sine
                case "Sine.IN":
                    return easeInSine;
                case "Sine.OUT":
                    return easeOutSine;
                case "Sine.INOUT":
                    return easeInOutSine;
                #endregion
                #region Expo
                case "Expo.IN":
                    return easeInExpo;
                case "Expo.OUT":
                    return easeOutExpo;
                case "Expo.INOUT":
                    return easeInOutExpo;
                #endregion
                #region Back
                case "Back.IN":
                    return easeInBack;
                case "Back.OUT":
                    return easeOutBack;
                case "Back.INOUT":
                    return easeInOutBack;
                #endregion
                #region Bounce
                case "Bounce.IN":
                    return easeInBounce;
                case "Bounce.OUT":
                    return easeOutBounce;
                case "Bounce.INOUT":
                    return easeInOutBounce;
                #endregion
                #region Elastic
                case "Elastic.IN":
                    return easeInElastic;
                case "Elastic.OUT":
                    return easeOutElastic;
                case "Elastic.INOUT":
                    return easeInOutElastic;
                #endregion
            }
            return easeNone;
        }
    }
}
